Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle no deneb fork schedule from beacon client #572

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

avalonche
Copy link
Collaborator

@avalonche avalonche commented Jan 25, 2024

📝 Summary

This PR handles the case where the deneb schedule is not found and only processes capella payloads. It defaults the epoch to -1 (as forks can occur on epoch = 0 on devnets).

⛱ Motivation and Context

As the deneb mainnet fork schedule has not been announced yet, the current relay behaviour on the deneb branch would:

  1. Default to denebEpoch = 0
  2. Return true for hasReachedFork(currentSlot, api.denebEpoch)
  3. Reject capella payloads as it thinks it has reached the deneb fork

this change would default to return false for hasReachedFork(currentSlot, api.denebEpoch) if the fork schedule was not found.

📚 References


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (deneb@d2237f8). Click here to learn what that means.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##             deneb     #572   +/-   ##
========================================
  Coverage         ?   35.66%           
========================================
  Files            ?       24           
  Lines            ?     5227           
  Branches         ?        0           
========================================
  Hits             ?     1864           
  Misses           ?     3106           
  Partials         ?      257           
Flag Coverage Δ
unittests 35.66% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

services/api/service.go Outdated Show resolved Hide resolved
Co-authored-by: Chris Hager <chris@linuxuser.at>
@metachris metachris merged commit 0346f6f into deneb Jan 25, 2024
2 checks passed
@metachris metachris deleted the deneb-fork-schedule branch January 25, 2024 18:39
blombern pushed a commit to ultrasoundmoney/mev-boost-relay that referenced this pull request Jan 30, 2024
* backwards compatibility if no deneb schedule

* Update services/api/service.go

Co-authored-by: Chris Hager <chris@linuxuser.at>

---------

Co-authored-by: Chris Hager <chris@linuxuser.at>
blombern pushed a commit to ultrasoundmoney/mev-boost-relay that referenced this pull request Jan 30, 2024
* backwards compatibility if no deneb schedule

* Update services/api/service.go

Co-authored-by: Chris Hager <chris@linuxuser.at>

---------

Co-authored-by: Chris Hager <chris@linuxuser.at>
avalonche added a commit that referenced this pull request Jan 30, 2024
* Remove bellatrix from wrapper types (#475)

* Remove bellatrix from wrapper types

* remove test logs

* Remove get header wrapper types (#477)

* Remove signed blinded beacon block wrapper (#482)

* remove signed blinded beacon block wrapper type

* linting

* remove signed beacon block wrapper types (#483)

* Remove submit block request wrapper (#485)

* remove submit block request wrapper types

* fix tests

* fix lint

* Upgrade go-boost-utils (#488)

* Upgrade go-boost-utils

* pr comments

* remove commented out code

* Add custom json marshalling for versioned structs (#493)

* Add deneb signature checking for block contents

* Add deneb support for type conversions

* Add redis and database tests to store deneb payloads

* Block submission to v3 validation endpoint

* Update signed block conversions

* Replace some expectCont with expectOk (#509)

* Allow fork epochs to be 0

* Make attestantio import names consistent (#510)

* Make attestantio import names consistent

* Fix linter errors & two comments

* Fix mistake in redis prefix name (#517)

* Fix mistake in redis prefix for deneb

* Fix typo in prefix

* rebase conflicts from main

* update submit block request

* bug fixes

* fix blob sidecar signature

* ssz encode request to publish block

* use v2 publish endpoint by default

* go mod tidy

* update relay to latest builder-specs

* update go mod

* fix lint and tests

* switch to json encoding instead of ssz for block publishing v2

* add blob logging

* address pr comments

* Handle no deneb fork schedule from beacon client (#572)

* backwards compatibility if no deneb schedule

* Update services/api/service.go

Co-authored-by: Chris Hager <chris@linuxuser.at>

---------

Co-authored-by: Chris Hager <chris@linuxuser.at>

* change specific error log to info because it's expected nowadays (#574)

* Add json and ssz marshalling tests (#573)

* add test vectors

* linting

---------

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Co-authored-by: Chris Hager <chris@linuxuser.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants